package com.shop.admin.service.system;

import com.shop.admin.dao.system.NewSystemConfigDao;
import com.shop.common.enums.System.NewSystemConfigEnum;
import com.shop.domain.system.NewSystemConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Slf4j
@Transactional
public class SystemService {


    @Autowired
    private NewSystemConfigDao newSystemConfigDao;



    public NewSystemConfig getSystemConfig(NewSystemConfigEnum newSystemConfigEnum){
        return newSystemConfigDao.findByCode(newSystemConfigEnum.getCategory(),newSystemConfigEnum.getCode());
    }

}
